package org.example.canteen.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;

@Data
//@TableName("dish")
@Document(indexName = "dishes")
public class Dish {
    @Id
    @Field(type= FieldType.Keyword)
    private Long id;

    @Field(type= FieldType.Text, analyzer = "ik_max_word")  //ik_smart智能分词  ik_max_word 最细粒度划分
    private String name;

    @Field(type= FieldType.Long, analyzer = "ik_max_word")  //ik_smart智能分词  ik_max_word 最细粒度划分
    private Long categoryId;

    @Field(type= FieldType.Double, analyzer = "ik_max_word")  //ik_smart智能分词  ik_max_word 最细粒度划分
    private double price;

    @Field(type= FieldType.Text, analyzer = "ik_max_word")  //ik_smart智能分词  ik_max_word 最细粒度划分
    private String image;

    @Field(type= FieldType.Text, analyzer = "ik_max_word")  //ik_smart智能分词  ik_max_word 最细粒度划分
    private String description;

    @Field(type= FieldType.Integer, analyzer = "ik_max_word")  //ik_smart智能分词  ik_max_word 最细粒度划分
    private  int status;


    @Field(type= FieldType.Long, analyzer = "ik_max_word")  //ik_smart智能分词  ik_max_word 最细粒度划分
    private Long createUser;

    @Field(type= FieldType.Long, analyzer = "ik_max_word")  //ik_smart智能分词  ik_max_word 最细粒度划分
    private Long updateUser;



}
